package com.daily.pump.activity;

import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.view.View;

import com.daily.pump.R;
import com.daily.pump.dialog.ScanResultNextDialog;
import com.daily.pump.model.Device;
import com.daily.pump.model.SimpleWifiBean;
import com.daily.pump.utils.WifiUtil;
import com.xunxi.mimi.ui.base.BaseActivity;
import com.xunxi.mimi.utils.ToastUtil;

/**
 * 作者: liyu on  2017/11/15 0015 14:29
 * 功能描述:
 * 备注:
 */
public class TestActivity extends BaseActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState, String tag) {
        setContentView(R.layout.activity_test);
    }

    @Override
    protected void initView() {
        findViewById(R.id.conn_btn).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ScanResultNextDialog scanResultNextDialog = ScanResultNextDialog.newInstance(new Device());
                scanResultNextDialog.setScanDialogListener(new ScanResultNextDialog.ScanDialogListener() {
                    @Override
                    public void onTurnLogin(SimpleWifiBean simpleWifiBean, String deviceName) {
                        scanResultNextDialog.dismissAllowingStateLoss();
                        ToastUtil.show(TestActivity.this, "连接成功");
                    }

                    @Override
                    public void onDismiss() {

                    }
                });
                scanResultNextDialog.show(getSupportFragmentManager());
            }
        });
    }

    @Override
    protected void initPresenter() {

    }

    @Override
    protected void initValue() {

    }
}
